import { request } from '@/utils/request'

// 密码登录
export const loginByPassword = (phone: string, password: string) =>
  request('app/auth/login', 'POST', { phone, password })

// 账户注册
export const userRegister = (phone: string, password: string, confirmPassword: string, referralCode: string) =>
  request('app/auth/register', 'POST', { phone, password, confirmPassword, referralCode })

// 退出登录
export const logout = () => request('app/auth/logout', 'POST')

//获取用户信息
export const getUserInfo = () => request('app/user/getInfo', 'GET')

// 编辑用户信息
export const editUserInfo = (data) => request('app/user/edit', 'post', data)

// 头像上传
export const upload = (data) => request('common/upload', 'POST', data)

// 根据字典类型查询字典数据信息
export const getDicts = (dictType) => request('/system/dict/data/type/' + dictType, 'GET',)




